package dao;

import entity.Student;
import entity.Teacher;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TeacherMapper {
    int deleteByPrimaryKey(Integer tid);

    int insert(Teacher record);

    int insertSelective(Teacher record);

    Teacher selectByPrimaryKey(Integer tid);

    int updateByPrimaryKeySelective(Teacher record);

    int updateByPrimaryKey(Teacher record);
    /*
    1对多查询，1个老师对应多个学生
     */
    Teacher selectByPrimaryKeyWithStuent(Integer tid);

    /*
    查询多个 老师的id，返回list
    需要申明参数和mapper.xml中的参数一致  @Param("tids")
     */
    List<Teacher> selectByTids(@Param("tids") List<Integer> tids);
}